import tushare as ts
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib import style
'''
Tushare -> py财经数据接口包
Wind -> 金融数据库(收费)
Quandl
Alpha vantage (json csv)
'''
if __name__ == '__main__':
    # adjust display option
    style.use('ggplot')
    # pd.set_option('display.max_columns', 20)

    # get data
    df = ts.get_hist_data('000001')
    print(df)

    # save data as csv files and read from csv files
    df.to_csv(r'dataset/000001.csv')
    df_read_csv = pd.read_csv(r'dataset/000001.csv')